package Factory

import "fmt"

type Restaurant interface {
	GetFood()
}
type DongXin struct {
}

func (d *DongXin) GetFood() {
	fmt.Println("东鑫的饭菜已生产完毕。。。")
}

type QingFeng struct {
}

func (q *QingFeng) GetFood() {
	fmt.Println("庆丰的包子已准备就绪。。。")
}

func NewRestaurant(name string) Restaurant {
	switch name {
	case string('d'):
		return &DongXin{}
	case string('q'):
		return &QingFeng{}
	}
	return nil
}
